//对（）的重载的时钟
#include <iostream>
using namespace std;
class Time
{
private:
    int hh, mm, ss;

public:
    Time(int h = 0, int m = 0, int s = 0) : hh(h), mm(m), ss(s) {}
    //重载（）运算符
    void operator()(int h, int m, int s)
    {
        hh = h;
        mm = m;
        ss = s;
    }
    void ShowTime()
    {
        cout << hh << ":" << mm << ":" << ss << endl;
    }
};
int main()
{
    Time t1(12, 10, 11);
    t1.ShowTime();
    //调用重载的（）操作符的方法1
    t1.operator()(23, 20, 34);
    t1.ShowTime();
    //调用重载的（）操作符的方法2
    t1(10, 10, 10);
    t1.ShowTime();
    system("pause");
    return 0;
}